package cn.huiyunche.admin.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.huiyunche.base.service.interfaces.AwardRecordService;
import cn.huiyunche.base.service.vo.PageVo;
import cn.huiyunche.base.service.vo.Result;
import cn.huiyunche.tools.basic.exceptions.BusinessException;

@RequestMapping("/award")
@Controller
public class AwardRecordController {
	
	@Autowired
	private AwardRecordService awardRecordService = null;
	
	/**
	 * 领取 奖品记录列表
	 * @param page
	 * @return
	 * @throws BusinessException
	 */
	@RequestMapping(value = "/list", method = RequestMethod.GET)
	@ResponseBody
	public Result<Object> list(PageVo page) throws BusinessException {
		Result<Object> result = new Result<Object>(true, null, "数据加载成功");
		result.setData(this.getAwardRecordService().list(page));
		return result;
	}

	public AwardRecordService getAwardRecordService() {
		return this.awardRecordService;
	}

}
